<?php
/**
 * Creater: 李青林
 * Date Time : 2018/8/14 17:48
 */

namespace App\Http\Models;

class UserAuth extends BaseModel
{
    protected $table = 'users_auth';
    const USER_INCOME_ONE = 1;//1--5W
    const USER_INCOME_TWO = 2;//5--10W
    const USER_INCOME_THREE = 3;//10--50W
    const USER_INCOME_FOUR = 4;//50--100W
    const USER_INCOME_FIVE = 5;//100W以上

    protected $fillable = ['real_name', 'user_id', 'id_number', 'channel_info', 'id_image_just', 'id_image_back', 'user_income', 'income_prove', 'channel_prove', 'status', 'phone'];

    //对应商品表
   /* public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }*/
    public function user()
    {
        return $this->hasOne('App\Http\Models\User', 'id', 'userid');
    }
    public static function get_user_income()
    {
        return [
            1 => '1--5W',
            2 => '5--10W',
            3 => '10--50W',
            4 => '50--100W',
            5 => '100W以上',
        ];
    }
    

}